package com.yzyz.utils.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.yzyz.management.bean.AdminBean;

public class AdminRowMapper implements RowMapper {

	@Override
	public Object mapRow(ResultSet rs, int arg1) throws SQLException {
		AdminBean admin = new AdminBean();
		admin.setId(rs.getInt("id"));
		admin.setName(rs.getString("name"));
		admin.setOwnerId(rs.getInt("ownerId"));
		admin.setPassword(rs.getString("password"));
		return admin;
	}

}
